using System;
using Science.Mathematics;
using L=Science.Physics.GeneralPhysics;

namespace Serway.Chapter03
{
	/// <summary>
	/// Example01: Polar Coordinates
	/// The Cartesian coordinates of a point in the xy plane 
	/// are (x, y) = (-3.50, -2.50) m, as shown in Figure 3.3. 
	/// Find the polar coordinates of this point.
	/// </summary>
	public class Example01
	{
		public Example01()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
			Complex c = new Complex(-3.5,-2.5);
			double r = c.Abs;
			double theta = c.Arg;
			result += Convert.ToString(r)+"  "+
				Convert.ToString(theta*180/Math.PI)+"   ";
			result += Convert.ToString(r*Math.Cos(theta))+"  "+
                Convert.ToString(r*Math.Sin(theta));
		}
	}
}
